import { UserController } from './controller/UserController';
import { NewsController } from './controller/NewsController';
import { FileController } from './controller/FileController';
import { CompanyController } from './controller/CompanyController';
import { DogController } from './controller/DogController';
import { CatController } from './controller/CatController';
import { RoleController } from './controller/RoleController';
import { PostController } from './controller/PostController'
import { CommentController } from './controller/CommentController'
import { ShopController } from './controller/ShopController'
import { ServiceController } from './controller/ServiceController'
export const Routes = [
  //文件管理
  {
    method: 'post',
    route: '/upload',
    controller: FileController,
    action: 'upload',
  },
  //用户管理
  {
    method: 'post',
    route: '/users/login',
    controller: UserController,
    action: 'login',
  },
  {
    method: 'post',
    route: '/users/register',
    controller: UserController,
    action: 'register',
  },
  {
    method: 'get',
    route: '/users/list',
    controller: UserController,
    action: 'all',
  },
  {
    method: 'post',
    route: '/users/add',
    controller: UserController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/users/:id',
    controller: UserController,
    action: 'one',
  },
  {
    method: 'delete',
    route: '/users/delete',
    controller: UserController,
    action: 'remove',
  },
  {
    method: 'post',
    route: '/users/bindRole',
    controller: UserController,
    action: 'bindRole',
  },

  //新闻资讯
  {
    method: 'post',
    route: '/news/add',
    controller: NewsController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/news/list',
    controller: NewsController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/news/queryById',
    controller: NewsController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/news/edit',
    controller: NewsController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/news/delete',
    controller: NewsController,
    action: 'remove',
  },
  //公司动态
  {
    method: 'post',
    route: '/company/add',
    controller: CompanyController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/company/list',
    controller: CompanyController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/company/queryById',
    controller: CompanyController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/company/edit',
    controller: CompanyController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/company/delete',
    controller: CompanyController,
    action: 'remove',
  },
  //狗狗大全
  {
    method: 'post',
    route: '/dog/add',
    controller: DogController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/dog/list',
    controller: DogController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/dog/queryById',
    controller: DogController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/dog/edit',
    controller: DogController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/dog/delete',
    controller: CompanyController,
    action: 'remove',
  },

  //猫猫大全
  {
    method: 'post',
    route: '/cat/add',
    controller: CatController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/cat/list',
    controller: CatController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/cat/queryById',
    controller: CatController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/cat/edit',
    controller: CatController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/cat/delete',
    controller: CatController,
    action: 'remove',
  },

  //角色

  {
    method: 'post',
    route: '/role/add',
    controller: RoleController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/role/list',
    controller: RoleController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/role/queryById',
    controller: RoleController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/role/edit',
    controller: RoleController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/role/delete',
    controller: RoleController,
    action: 'remove',
  },

  //论坛
  {
    method: 'post',
    route: '/post/add',
    controller: PostController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/post/list',
    controller: PostController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/post/queryById',
    controller: PostController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/post/edit',
    controller: PostController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/post/delete',
    controller: PostController,
    action: 'remove',
  },

  //评论
  {
    method: 'post',
    route: '/comment/add',
    controller: CommentController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/comment/list',
    controller: CommentController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/comment/queryById',
    controller: CommentController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/comment/edit',
    controller: CommentController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/comment/delete',
    controller: CommentController,
    action: 'remove',
  },

  //商城
  {
    method: 'post',
    route: '/shop/add',
    controller: ShopController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/shop/list',
    controller: ShopController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/shop/queryById',
    controller: ShopController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/shop/edit',
    controller: ShopController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/shop/delete',
    controller: ShopController,
    action: 'remove',
  },


  //服务
  {
    method: 'post',
    route: '/service/add',
    controller: ServiceController,
    action: 'add',
  },
  {
    method: 'get',
    route: '/service/list',
    controller: ServiceController,
    action: 'list',
  },
  {
    method: 'get',
    route: '/service/queryById',
    controller: ServiceController,
    action: 'one',
  },
  {
    method: 'post',
    route: '/service/edit',
    controller: ServiceController,
    action: 'edit',
  },
  {
    method: 'delete',
    route: '/service/delete',
    controller: ServiceController,
    action: 'remove',
  },
];
